package com.yuanheng100.ems4j.api.model;

import com.yuanheng100.ems4j.common.constant.Boolean;
import com.yuanheng100.ems4j.api.model.bizstatus.DepartmentStatus;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by j4love on 2016/12/13.
 * Description : 部门实体类
 */

@Table(name = "department")
public class Department implements Serializable{

    /** 部门Id,主键自增 */
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer depIp;

    /** 父部门id。根部门id为1 */
    @Column(name = "parentId")
    private Integer parentId;

    /** 在父部门中的次序值。order值小的排序靠前 */
    @Column(name = "order")
    private Short order;

    /** 部门名称 */
    @Column(name = "depName")
    private String depName;

    /** 部门地址 */
    @Column(name = "address")
    private String address;

    /** 联系电话 */
    @Column(name = "telephone")
    private Long telephone;

    /** 电话区号 */
    @Column(name = "areaCode")
    private Short areaCode;

    /** 部门所在省市县的6位代码 */
    @Column(name = "regionCode")
    private Integer regionCode;

    /** 部门类型 */
    @Column(name = "depType")
    private Short depType;

    /** 部门创建日期 */
    @Column(name = "createTime")
    private Date createTime;

    /** 启用状态，1启用；2注销 */
    @Column(name = "depStatus")
    private DepartmentStatus depStatus;

    /** 注销日期 */
    @Column(name = "deleteDate")
    private Date deleteDate;

    /** 所属应用id集合 */
    @Column(name = "appIds")
    private String appIds;

    /**
     * dingding - 是否创建一个关联此部门的企业群
     */
    @Column(name = "dingCreateDeptGroup")
    private Boolean dingCreateDeptGroup;

    /** 是否隐藏部门, true表示隐藏, false表示显示 */
    @Column(name = "dingDeptHiding")
    private Boolean dingDeptHiding;

    /**
     * dingding - 可以查看指定隐藏部门的其他部门列表，
     * 如果部门隐藏，则此值生效，取值为其他的部门id组成的的字符串，使用 | 符号进行分割
     */
    @Column(name = "dingDeptPerimits")
    private String dingDeptPerimits;

    /**
     * dingding - 可以查看指定隐藏部门的其他人员列表，
     * 如果部门隐藏，则此值生效，取值为其他的人员userid组成的的字符串，使用| 符号进行分割
     */
    @Column(name = "dingUserPerimits")
    private String dingUserPerimits;

    /**
     * dingding - 是否本部门的员工仅可见员工自己, 为true时，本部门员工默认只能看到员工自己
     */
    @Column(name = "dingOuterDept")
    private Boolean dingOuterDept;

    /**
     * dingding - 本部门的员工仅可见员工自己为true时，
     * 可以配置额外可见部门，值为部门id组成的的字符串，使用|符号进行分割
     */
    @Column(name = "dingOuterPermitDepts")
    private String dingOuterPermitDepts;

    /**
     * dingding - 本部门的员工仅可见员工自己为true时，
     * 可以配置额外可见人员，值为userid组成的的字符串，使用|符号进行分割
     */
    @Column(name = "dingOuterPermitUsers")
    private String dingOuterPermitUsers;

    public Integer getDepIp() {
        return depIp;
    }

    public void setDepIp(Integer depIp) {
        this.depIp = depIp;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Short getOrder() {
        return order;
    }

    public void setOrder(Short order) {
        this.order = order;
    }

    public String getDepName() {
        return depName;
    }

    public void setDepName(String depName) {
        this.depName = depName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Long getTelephone() {
        return telephone;
    }

    public void setTelephone(Long telephone) {
        this.telephone = telephone;
    }

    public Short getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(Short areaCode) {
        this.areaCode = areaCode;
    }

    public Integer getRegionCode() {
        return regionCode;
    }

    public void setRegionCode(Integer regionCode) {
        this.regionCode = regionCode;
    }

    public Short getDepType() {
        return depType;
    }

    public void setDepType(Short depType) {
        this.depType = depType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public DepartmentStatus getDepStatus() {
        return depStatus;
    }

    public void setDepStatus(DepartmentStatus depStatus) {
        this.depStatus = depStatus;
    }

    public Date getDeleteDate() {
        return deleteDate;
    }

    public void setDeleteDate(Date deleteDate) {
        this.deleteDate = deleteDate;
    }

    public String getAppIds() {
        return appIds;
    }

    public void setAppIds(String appIds) {
        this.appIds = appIds;
    }

    public Boolean getDingCreateDeptGroup() {
        return dingCreateDeptGroup;
    }

    public void setDingCreateDeptGroup(Boolean dingCreateDeptGroup) {
        this.dingCreateDeptGroup = dingCreateDeptGroup;
    }

    public Boolean getDingDeptHiding() {
        return dingDeptHiding;
    }

    public void setDingDeptHiding(Boolean dingDeptHiding) {
        this.dingDeptHiding = dingDeptHiding;
    }

    public String getDingDeptPerimits() {
        return dingDeptPerimits;
    }

    public void setDingDeptPerimits(String dingDeptPerimits) {
        this.dingDeptPerimits = dingDeptPerimits;
    }

    public String getDingUserPerimits() {
        return dingUserPerimits;
    }

    public void setDingUserPerimits(String dingUserPerimits) {
        this.dingUserPerimits = dingUserPerimits;
    }

    public Boolean getDingOuterDept() {
        return dingOuterDept;
    }

    public void setDingOuterDept(Boolean dingOuterDept) {
        this.dingOuterDept = dingOuterDept;
    }

    public String getDingOuterPermitDepts() {
        return dingOuterPermitDepts;
    }

    public void setDingOuterPermitDepts(String dingOuterPermitDepts) {
        this.dingOuterPermitDepts = dingOuterPermitDepts;
    }

    public String getDingOuterPermitUsers() {
        return dingOuterPermitUsers;
    }

    public void setDingOuterPermitUsers(String dingOuterPermitUsers) {
        this.dingOuterPermitUsers = dingOuterPermitUsers;
    }

    @Override
    public String toString() {
        return "Department{" +
                "dingOuterPermitUsers='" + dingOuterPermitUsers + '\'' +
                ", dingOuterPermitDepts='" + dingOuterPermitDepts + '\'' +
                ", dingOuterDept=" + dingOuterDept +
                ", dingUserPerimits='" + dingUserPerimits + '\'' +
                ", dingDeptPerimits='" + dingDeptPerimits + '\'' +
                ", dingDeptHiding=" + dingDeptHiding +
                ", dingCreateDeptGroup=" + dingCreateDeptGroup +
                ", appIds='" + appIds + '\'' +
                ", deleteDate=" + deleteDate +
                ", depStatus=" + depStatus +
                ", createTime=" + createTime +
                ", depType=" + depType +
                ", regionCode=" + regionCode +
                ", areaCode=" + areaCode +
                ", telephone=" + telephone +
                ", address='" + address + '\'' +
                ", depName='" + depName + '\'' +
                ", order=" + order +
                ", parentId=" + parentId +
                ", depIp=" + depIp +
                '}';
    }
}
